import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-09-02
 * Time: 8:35
 */
public class TestSort {
    //快速排序,非递归实现
    public static void main(String[] args) {
        int[] array = {6,1,2,7,9,3,4,5,10,8};
        Sort.quickStack(array);
        System.out.println(Arrays.toString(array));
    }
    //快速排序
    public static void main6(String[] args) {
        int[] array = {6,1,2,7,9,3,4,5,10,8};
        Sort.quickSort(array);
        System.out.println(Arrays.toString(array));
    }
    //冒泡排序
    public static void main5(String[] args) {
        int[] array = {27,15,19,28,34,65,49,25,37};
        Sort.bubbleSort(array);
        System.out.println(Arrays.toString(array));
    }
    //堆排序
    public static void main4(String[] args) {
        int[] array = {27,15,19,28,34,65,49,25,37};
        Sort.createBigheap(array);
        System.out.println(Arrays.toString(array));
    }
    //选择排序
    public static void main3(String[] args) {
        int[] array = { 78, 3, 10, 7, 2};
        Sort.selectSort1(array);
        System.out.println(Arrays.toString(array));
    }

    //希尔排序
    public static void main2(String[] args) {
        int[] array = {9,1,2,5,7,4,8,6,3,5};
        Sort.shellSort(array);
        System.out.println(Arrays.toString(array));
    }
    //直接插入排序
    public static void main1(String[] args) {
        int[] array = {8,2,4,6,71,3};
        Sort.insertSort(array);
        System.out.println(Arrays.toString(array));
    }
}
